﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="tbUser.ascx.cs" Inherits="cms_Admin_Users_tbUser" %>
<style type="text/css">
    .style1
    {
        font-size: 16px;
        font-weight: bold;
        text-align: left;
        padding-top: 10px;
    }
</style>
<div class="titad">QUẢN TRỊ DANH SÁCH THÀNH VIÊN</div>
<asp:Panel ID="pnDanhsach" runat="server">
<div class="add">
    <asp:LinkButton CssClass="addnew" id="lbtinsertadv" runat="server" 
        ToolTip="Thêm mới thành viên" onclick="lbtinsertadv_Click">Thêm mới</asp:LinkButton>&nbsp;
    <asp:Label ID="lblThongbao" runat="server" 
        style="font-family: Tahoma; font-size: 8pt; color: #FF0000"></asp:Label>
</div>
<table class="Tableadmins" width="100%" border="1">
<tr class="Headadmin" style="height:25px">
    <td style="width:2%" class="contentadmin">No</td>
    <td style="width:4%" class="contentadmin">
    <asp:LinkButton CssClass="delete" 
            id="LinkButton4" ForeColor="White" runat="server" 
        ToolTip="Xóa nhiều nhân viên" onclick="LinkButton4_Click">Xóa</asp:LinkButton>
    </td>
    <td style="width:17%" class="contentadmin">UserName</td>
    <td class="contentadmin" style="width:15%">Tên thành viên</td>
    <td style="width:12%" class="contentadmin">Phòng ban</td>
    <td style="width:12%" class="contentadmin">Bộ phận</td>
    <td style="width:10%" class="contentadmin">Chức vụ</td>
    <td style="width:8%" class="contentadmin">
    <asp:UpdatePanel ID="upeCN" runat="server">
        <ContentTemplate>
    <asp:LinkButton CssClass="update" 
            id="LinkButton3" ForeColor="White" runat="server" 
        ToolTip="Cập nhật quyền công nhân" onclick="LinkButton3_Click">Quyền CN</asp:LinkButton>
    </ContentTemplate>
    </asp:UpdatePanel>
    </td>
    <td style="width:6%" class="contentadmin">Thứ tự</td>
    <td style="width:10%" class="contentadmin">
        <asp:DropDownList ID="drlChuyennhom" runat="server" 
            style="font-family: Arial; font-size: 10pt; width: 130px">
        </asp:DropDownList>
    </td>
    <td style="width:15%" class="contentadmin" colspan="3">Chức năng</td>
</tr>
<asp:Repeater ID="rptDanhsach" runat="server" onitemcommand="rptDanhsach_ItemCommand">
<ItemTemplate>
<tr style="height:20px" class="tr_while" onmouseover="this.className='tr_while_over'" onmouseout="this.className='tr_while'">
    <td align="center" class="contentadmin"><asp:Label ID="lblorder" runat="server"></asp:Label><asp:Label ID="lblID" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem,"uID")%>'></asp:Label></td>
    <td class="contentadmin" align="center">
        <asp:CheckBox ID="chkDelete" runat="server" />
    </td>
    <td align="left" style="padding-left:5px" class="contentadmin"><%#Hienthihinhcay(DataBinder.Eval(Container.DataItem, "uUser").ToString(),DataBinder.Eval(Container.DataItem, "uLevel").ToString())%></td>
    <td align="left" style="padding-left:5px" class="contentadmin"><%#DataBinder.Eval(Container.DataItem, "uName")%></td>    
    <td align="left" style="padding-left:5px" class="contentadmin"><%#ViewNameDepartment(DataBinder.Eval(Container.DataItem, "dpID").ToString())%></td>    <td align="left" style="padding-left:5px" class="contentadmin"><%#Bophan(DataBinder.Eval(Container.DataItem, "paId").ToString())%></td>
    <td align="left" style="padding-left:5px" class="contentadmin"><%#ViewNamePosition(DataBinder.Eval(Container.DataItem, "psID").ToString())%></td>    
    <td align="center" class="contentadmin">
    <div style="float: left; width: 30px; text-align: right">
    <asp:UpdateProgress ID="uprsCN" runat="server" DynamicLayout="true" AssociatedUpdatePanelID="upeCN">
            <ProgressTemplate>
                <img src="images/ajax-loader.gif" />
            </ProgressTemplate>
    </asp:UpdateProgress>
    </div>
    <div style="float: right; width: 50px; text-align: left"><asp:CheckBox ID="chkCongnhan" runat="server" Checked='<%#QuyenCN(DataBinder.Eval(Container.DataItem, "uCN").ToString())%>' /></div>
    </td>    
    <td align="center" style="padding-right:2px" class="contentadmin"><%#DataBinder.Eval(Container.DataItem, "uOrd")%></td>
    <td align="center" class="contentadmin">
    <table>
    <tr>
<%--    <td>
        <asp:UpdateProgress ID="upr1" runat="server" DynamicLayout="true" AssociatedUpdatePanelID="upn10">
            <ProgressTemplate>
                <img src="images/ajax-loader.gif" />
            </ProgressTemplate>
        </asp:UpdateProgress>
    </td>--%>
    <td class="contentadmin">
        <asp:CheckBox ID="chkChon" runat="server" />&nbsp;&nbsp;
    </td>
    <td>
            <asp:LinkButton ID="lbtChuyennhom" runat="server" CssClass="LinkButton" CommandName="Cut">Chuyển nhóm</asp:LinkButton>
    </td>
    </tr>
    </table>
    </td>
    <td style="width:5%" align="center" class="atd"><asp:LinkButton CssClass="addnew" ID="LinkButton2" Runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"uID")%>' CommandName="Add" ToolTip="Thêm cấp dưới">Thêm</asp:LinkButton></td>
    <td style="width:5%" align="center" class="atd"><asp:LinkButton CssClass="edit" ID="LinkButton1" Runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"uID")%>' CommandName="Edit" ToolTip="Sửa">Sửa</asp:LinkButton></td>
    <td style="width:5%" align="center" class="atd"><asp:LinkButton CssClass="delete" ID="lbt2" Runat="server" OnLoad="Delete" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"uID")%>' CommandName="Delete" ToolTip="Xoá">Xóa</asp:LinkButton></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</asp:Panel>
<asp:Panel ID="pnUpdate" Visible="false" runat="server">
<div style="height:10px"></div>
<table class="Tables">
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label12" runat="server" CssClass="labadd" 
                    Text="Thuộc phòng ban:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:DropDownList ID="drlPhongban" runat="server" 
                    style="font-family: Tahoma; font-size: 10pt" Width="200px" 
                    onselectedindexchanged="drlPhongban_SelectedIndexChanged" 
                    AutoPostBack="True">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label18" runat="server" CssClass="labadd" Text="Bộ phận:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:DropDownList ID="drlBophan" runat="server" 
                    style="font-family: Tahoma; font-size: 10pt" Width="200px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label13" runat="server" CssClass="labadd" Text="Thuộc chức vụ:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:DropDownList ID="drlChucvu" runat="server" 
                    style="font-family: Tahoma; font-size: 10pt" Width="200px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label14" runat="server" CssClass="labadd" 
                    Text="Quyền quản trị:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:CheckBox ID="chkQuantri" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label11" runat="server" CssClass="labadd" 
                    Text="Mã nhân viên:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtMathanhvien" runat="server" CssClass="texadd" Width="120px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label1" runat="server" CssClass="labadd" 
                    Text="Acount thành viên:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtUserID" runat="server" CssClass="texadd" Width="250px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label2" runat="server" CssClass="labadd" 
                    Text="Mật khẩu thành viên:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtPassID" runat="server" CssClass="texadd" Width="250px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label6" runat="server" CssClass="labadd" Text="Tên thành viên:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtTen" runat="server" CssClass="texadd" Width="250px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label8" runat="server" CssClass="labadd" 
                    Text="Ngày sinh:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtNgaysinh" runat="server" CssClass="texadd" Width="120px"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" 
                    Format="MM/dd/yyyy" PopupButtonID="txtNgaysinh" TargetControlID="txtNgaysinh">
                </ajaxToolkit:CalendarExtender>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label9" runat="server" CssClass="labadd" 
                    Text="Địa chỉ:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtDiachi" runat="server" CssClass="texadd" Width="250px" 
                    Height="50px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label10" runat="server" CssClass="labadd" Text="Điện thoại:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtDienthoai" runat="server" CssClass="texadd" Width="250px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label3" runat="server" CssClass="labadd" Text="Email:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtEmail" runat="server" CssClass="texadd" Width="250px"></asp:TextBox>
            </td>
        </tr>
        <tr>
        <td class="leftadd">
            <asp:Label ID="Label15" runat="server" CssClass="labadd" Text="Ảnh nhân viên:"></asp:Label>
            </td>
        <td class="lerightadd">
            <asp:FileUpload ID="fileupload" runat="server" />
            &nbsp;</td>
        </tr>
        <tr>
            <td class="leftadd">
            </td>
            <td class="lerightadd">
                <asp:Label ID="lblImg" runat="server" Visible="False"></asp:Label>
                <asp:Literal ID="ltrImg" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label7" runat="server" CssClass="labadd" 
                    Text="Thứ tự:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:DropDownList ID="drlThutu" runat="server" 
                    style="font-family: Tahoma; font-size: 9pt; color: #000000">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label16" runat="server" CssClass="labadd" 
                    Text="Quyền công nhân:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:CheckBox ID="chkCongnhan" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                &nbsp;</td>
            <td class="lerightadd">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="leftadd">
                &nbsp;</td>
            <td class="lerightadd">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="leftadd" 
                style="background: #e4e7d2; height: 28px; padding-top: 4px; padding-bottom: 4px">
                &nbsp;</td>
            <td class="lerightadd" 
                style="background: #e4e7d2; height: 28px; padding-top: 4px; padding-bottom: 4px">
                <asp:LinkButton ID="lbtCapnhat" runat="server" CssClass="update" 
                    onclick="lbtCapnhat_Click">Cập nhật</asp:LinkButton>
                <asp:LinkButton ID="lbtTrolai" runat="server" CssClass="back" 
                    onclick="lbtTrolai_Click">Trở lại</asp:LinkButton>
                &nbsp;
                <asp:Label ID="lblLoi" runat="server" 
                    style="font-family: Tahoma; font-size: 8pt; color: #FF0000"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="leftadd">&nbsp;</td>
            <td class="style1">
                Chọn file để cập nhật danh sách Công nhân</td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label17" runat="server" CssClass="labadd" Text="File Excel:"></asp:Label>
            </td>
            <td class="lerightadd">
                <input ID="file_Excel" runat="server" name="file_Image" type="file" />
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                <asp:Label ID="Label4" runat="server" CssClass="labadd" Text="Tên sheet:"></asp:Label>
            </td>
            <td class="lerightadd">
                <asp:TextBox ID="txtSheet" runat="server">Sheet1</asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                &nbsp;</td>
            <td class="lerightadd">
                <asp:LinkButton ID="lbtCapnhatCN" runat="server" CssClass="update" 
                    onclick="lbtCapnhatCN_Click">Thêm danh sách công nhân</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td class="leftadd">
                &nbsp;</td>
            <td class="lerightadd">
                &nbsp;</td>
        </tr>
    </table>
 </asp:Panel>